package com.gvt.util;

import java.sql.Types;

public class TypeUtil {

	public static String typeToJava(int type){
		String javaType = null;
		switch(type){
			case Types.ARRAY : javaType = "ARRAY";break;
			case Types.BIGINT : javaType = "BIGINT";break;
			case Types.BINARY: javaType = "BINARY";break;
			case Types.BIT: javaType = "BIT";break;
			case Types.BLOB: javaType = "BLOB";break;
			case Types.BOOLEAN: javaType = "BOOLEAN";break;
			case Types.CHAR: javaType = "CHAR";break;
			case Types.CLOB: javaType = "CLOB";break;
			case Types.DATALINK: javaType = "DATALINK";break;
			case Types.DATE: javaType = "DATE";break;
			case Types.DECIMAL: javaType = "DECIMAL";break;
			case Types.DISTINCT: javaType = "DISTINCT";break;
			case Types.DOUBLE: javaType = "DOUBLE";break;
			case Types.FLOAT: javaType = "FLOAT";break;
			case Types.INTEGER: javaType = "INTEGER";break;
			case Types.JAVA_OBJECT : javaType = "JAVA_OBJECT";break;
			case Types.LONGNVARCHAR : javaType = "LONGNVARCHAR";break;
			case Types.LONGVARBINARY : javaType = "LONGVARBINARY";break;
			case Types.LONGVARCHAR : javaType = "LONGVARCHAR";break;
			case Types.NCHAR : javaType = "NCHAR";break;
			case Types.NCLOB : javaType = "NCLOB";break;
			case Types.NULL : javaType = "NULL";break;
			case Types.NUMERIC : javaType = "NUMERIC";break;
			case Types.NVARCHAR : javaType = "NVARCHAR";break;
			case Types.OTHER : javaType = "OTHER";break;
			case Types.REAL : javaType = "REAL";break;
			case Types.REF : javaType = "REF";break;
			case Types.ROWID : javaType = "ROWID";break;
			case Types.SMALLINT : javaType = "SMALLINT";break;
			case Types.SQLXML : javaType = "SQLXML";break;
			case Types.STRUCT : javaType = "STRUCT";break;
			case Types.TIME : javaType = "TIME";break;
			case Types.TIMESTAMP : javaType = "TIMESTAMP";break;
			case Types.TINYINT : javaType = "TINYINT";break;
			case Types.VARBINARY : javaType = "VARBINARY";break;
			case Types.VARCHAR : javaType = "VARCHAR";break;
		}
		return javaType;
	}
}
